package top.yuyufeng.mbuy.dto;

import org.springframework.util.StringUtils;

/**
 * @author yuyufeng
 * @date 2019/3/1.
 */
public class PageQuery {
    private Integer pageNum;
    private Integer pageSize;
    private String orderBy;

    public PageQuery() {
    }

    public Integer getPageNum() {
        return pageNum;
    }

    public void setPageNum(Integer pageNum) {
        this.pageNum = pageNum;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public String getOrderBy() {
        if(StringUtils.isEmpty(orderBy)){
            orderBy = "create_time desc";
        }
        return orderBy;
    }

    public void setOrderBy(String orderBy) {
        this.orderBy = orderBy;
    }
}
